class DeviceInfo {
  DeviceInfo({
    int? code,
    String? message,
    Data? data,
  }) {
    _code = code;
    _message = message;
    _data = data;
  }

  DeviceInfo.fromJson(dynamic json) {
    _code = json['code'];
    _message = json['message'];
    _data = json['data'] != null ? Data.fromJson(json['data']) : null;
  }

  int? _code;
  String? _message;
  Data? _data;

  int? get code => _code;

  String? get message => _message;

  Data? get data => _data;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = _code;
    map['message'] = _message;
    if (_data != null) {
      map['data'] = _data?.toJson();
    }
    return map;
  }
}

class Data {
  Data({
    int? total,
    List<Rows>? rows,
  }) {
    _total = total;
    _rows = rows;
  }

  Data.fromJson(dynamic json) {
    _total = json['total'];
    if (json['rows'] != null) {
      _rows = [];
      json['rows'].forEach((v) {
        _rows?.add(Rows.fromJson(v));
      });
    }
  }

  int? _total;
  List<Rows>? _rows;

  int? get total => _total;

  List<Rows>? get rows => _rows;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['total'] = _total;
    if (_rows != null) {
      map['rows'] = _rows?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

class Rows {
  Rows({
    int? id,
    String? mac,
    int? deviceTypeValue,
    String? deviceTypeName,
    int? isDeviceBind,
    int? isDeviceOnline,
    int? customerDepartmentId,
    String? customerDepartmentName,
    int? bindDepartmentId,
    String? bindDepartmentName,
    int? deliveryTime,
    int? createTime,
    int? updateTime,
    int? tokenId,
    dynamic creatorUserId,
    dynamic creatorUserName,
    dynamic sellerName,
    String? localName,
    int? loginAt,
    int? model,
    String? remark,
    int? status,
    dynamic longitude,
    dynamic latitude,
    String? address,
    dynamic province,
    dynamic city,
    dynamic county,
  }) {
    _id = id;
    _mac = mac;
    _deviceTypeValue = deviceTypeValue;
    _deviceTypeName = deviceTypeName;
    _isDeviceBind = isDeviceBind;
    _isDeviceOnline = isDeviceOnline;
    _customerDepartmentId = customerDepartmentId;
    _customerDepartmentName = customerDepartmentName;
    _bindDepartmentId = bindDepartmentId;
    _bindDepartmentName = bindDepartmentName;
    _deliveryTime = deliveryTime;
    _createTime = createTime;
    _updateTime = updateTime;
    _tokenId = tokenId;
    _creatorUserId = creatorUserId;
    _creatorUserName = creatorUserName;
    _sellerName = sellerName;
    _localName = localName;
    _loginAt = loginAt;
    _model = model;
    _remark = remark;
    _status = status;
    _longitude = longitude;
    _latitude = latitude;
    _address = address;
    _province = province;
    _city = city;
    _county = county;
  }

  Rows.fromJson(dynamic json) {
    _id = json['id'];
    _mac = json['mac'];
    _deviceTypeValue = json['deviceTypeValue'];
    _deviceTypeName = json['deviceTypeName'];
    _isDeviceBind = json['isDeviceBind'];
    _isDeviceOnline = json['isDeviceOnline'];
    _customerDepartmentId = json['customerDepartmentId'];
    _customerDepartmentName = json['customerDepartmentName'];
    _bindDepartmentId = json['bindDepartmentId'];
    _bindDepartmentName = json['bindDepartmentName'];
    _deliveryTime = json['deliveryTime'];
    _createTime = json['createTime'];
    _updateTime = json['updateTime'];
    _tokenId = json['tokenId'];
    _creatorUserId = json['creatorUserId'];
    _creatorUserName = json['creatorUserName'];
    _sellerName = json['sellerName'];
    _localName = json['localName'];
    _loginAt = json['loginAt'];
    _model = json['model'];
    _remark = json['remark'];
    _status = json['status'];
    _longitude = json['longitude'];
    _latitude = json['latitude'];
    _address = json['address'];
    _province = json['province'];
    _city = json['city'];
    _county = json['county'];
  }

  int? _id;
  String? _mac;
  int? _deviceTypeValue;
  String? _deviceTypeName;
  int? _isDeviceBind;
  int? _isDeviceOnline;
  int? _customerDepartmentId;
  String? _customerDepartmentName;
  int? _bindDepartmentId;
  String? _bindDepartmentName;
  int? _deliveryTime;
  int? _createTime;
  int? _updateTime;
  int? _tokenId;
  dynamic _creatorUserId;
  dynamic _creatorUserName;
  dynamic _sellerName;
  String? _localName;
  int? _loginAt;
  int? _model;
  String? _remark;
  int? _status;
  dynamic _longitude;
  dynamic _latitude;
  String? _address;
  dynamic _province;
  dynamic _city;
  dynamic _county;

  int? get id => _id;

  String? get mac => _mac;

  int? get deviceTypeValue => _deviceTypeValue;

  String? get deviceTypeName => _deviceTypeName;

  int? get isDeviceBind => _isDeviceBind;

  int? get isDeviceOnline => _isDeviceOnline;

  int? get customerDepartmentId => _customerDepartmentId;

  String? get customerDepartmentName => _customerDepartmentName;

  int? get bindDepartmentId => _bindDepartmentId;

  String? get bindDepartmentName => _bindDepartmentName;

  int? get deliveryTime => _deliveryTime;

  int? get createTime => _createTime;

  int? get updateTime => _updateTime;

  int? get tokenId => _tokenId;

  dynamic get creatorUserId => _creatorUserId;

  dynamic get creatorUserName => _creatorUserName;

  dynamic get sellerName => _sellerName;

  String? get localName => _localName;

  int? get loginAt => _loginAt;

  int? get model => _model;

  String? get remark => _remark;

  int? get status => _status;

  dynamic get longitude => _longitude;

  dynamic get latitude => _latitude;

  String? get address => _address;

  dynamic get province => _province;

  dynamic get city => _city;

  dynamic get county => _county;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['mac'] = _mac;
    map['deviceTypeValue'] = _deviceTypeValue;
    map['deviceTypeName'] = _deviceTypeName;
    map['isDeviceBind'] = _isDeviceBind;
    map['isDeviceOnline'] = _isDeviceOnline;
    map['customerDepartmentId'] = _customerDepartmentId;
    map['customerDepartmentName'] = _customerDepartmentName;
    map['bindDepartmentId'] = _bindDepartmentId;
    map['bindDepartmentName'] = _bindDepartmentName;
    map['deliveryTime'] = _deliveryTime;
    map['createTime'] = _createTime;
    map['updateTime'] = _updateTime;
    map['tokenId'] = _tokenId;
    map['creatorUserId'] = _creatorUserId;
    map['creatorUserName'] = _creatorUserName;
    map['sellerName'] = _sellerName;
    map['localName'] = _localName;
    map['loginAt'] = _loginAt;
    map['model'] = _model;
    map['remark'] = _remark;
    map['status'] = _status;
    map['longitude'] = _longitude;
    map['latitude'] = _latitude;
    map['address'] = _address;
    map['province'] = _province;
    map['city'] = _city;
    map['county'] = _county;
    return map;
  }
}
